const sleepPromise = time => new Promise((resolve) => {
  setTimeout(
    resolve,
    time
  )
})

sleepPromise(1000).then(() => console.log('awake'))
